package MyGO.utils.enumerastion;

import java.util.ArrayList;
import java.util.List;

public enum DoctorLevel {
    GENERAL,  // 普通医生
    EXPERT,  // 专家
    PROFESSOR;  // 教授

    @Override
    public String toString() {
        return switch (this) {
            case GENERAL -> "普通医生";
            case EXPERT -> "专家";
            case PROFESSOR -> "教授";
        };
    }

    public Double getFee() {
        return switch (this) {
            case GENERAL -> 5.0;
            case EXPERT -> 10.0;
            case PROFESSOR -> 15.0;
        };
    }
    public static DoctorLevel parseDoctorLevel(String doctorLevel) {
        return switch (doctorLevel) {
            case "普通医生" -> GENERAL;
            case "专家" -> EXPERT;
            case "教授" -> PROFESSOR;
            default -> null;
        };
    }

    public static List<DoctorLevel> getDocLevList() {
        List<DoctorLevel> doctorLevelList = new ArrayList<>();
        doctorLevelList.add(GENERAL);
        doctorLevelList.add(EXPERT);
        doctorLevelList.add(PROFESSOR);
        return doctorLevelList;
    }
}
